package com.yangzc.lion.common.dao;

import java.io.Serializable;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.yangzc.lion.common.model.IBaseModel;

/**
 * 
 * DAO层扩展模块,主要使用SPRING JDBCTEMPLATE的接口
 * 
 * @author wanb
 * @param T
 */
public abstract class AbstractBaseDao<T extends IBaseModel, PK extends Serializable>
		extends HibernateDaoSupport implements IBaseDao<T, PK> {

	protected final Logger LOGGER = Logger.getLogger(getClass());

	// SPRING JDBC模板接口
	private JdbcTemplate jdbcTemplate;

	public JdbcTemplate getJdbcTemplate() {
		return jdbcTemplate;
	}

	@Resource(name = "jdbcTemplate")
	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

}
